<@master template="master/master-p2p"  title="${title}模板">
     <div class="detailsBox">
     		<div class="openBox">
               <h3><i class="jtIco"></i>模板信息</h3>
               <div class="detaiTab">
               			  <form  name="save" id="save" action='/templateRest/save_template' method ='post'  class="action-ajax-form action-ajax-form-valid" >
			                  <table width="100%" cellspacing="0" cellpadding="0" border="0">
			                       <tbody>
			                           
			                          <tr>	                              
		                                 <td width="15%" align="right" class="bg">模板名称：<font color="red">*</font></td>
		                                 <td > 
		                                      <input type="text"  id="templateName" value="${vo.templateName}" size="20" name="templateName"   class="action-valid-field" data-action-valid-rule="required;maxlength:30;" data-action-valid-msg-required="模板名称不能为空！"  autocomplete="off"/>
		                                	  <span class="action-field-error" for="templateName" style="color:red;"></span>                             	
		                                 </td>
		                                 <td width="15%" align="right" class="bg">模板类型：<font color="red">*</font></td>
		                                 <td > 
                                             <@select dataSouceType="template_type"   name="templateType" value="${vo.templateType}" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="模板类型不能为空！"/>
		                                	  <span class="action-field-error" for="templateType" style="color:red;"></span>                             	
		                                 </td>
		                                 
	                                  </tr>
	                                  <tr>
	                                     <td width="15%" align="right" class="bg">每小时发送次数限制：</td>
		                                 <td > 
		                                      <input type="text"  id="timesPerHour" value="${vo.timesPerHour}" size="20" name="timesPerHour"         autocomplete="off"/>     
		                                       <span class="action-field-error" for="timesPerHour" style="color:red;"></span>                               	
		                                 </td>	                              
		                                 <td width="15%" align="right" class="bg">每天发送次数限制：</td>
		                                 <td > 
		                                      <input type="text"  id="timesPerDay" value="${vo.timesPerDay}" size="20" name="timesPerDay"   autocomplete="off"/>  
		                                        <span class="action-field-error" for="timesPerDay" style="color:red;"></span>                 	
		                                 </td>
		                                
	                                  </tr>
	                                  <tr>
	                                      <td width="15%"  align="right" class="bg">模板详情:</td>
	                                      <td colspan="3">
						                    <textarea id="templateContent" name="templateContent" style="width:400px;height:160px;">${vo.templateContent}</textarea>
						                  </td>
	                                  </tr>
	                                   
			 					   </tbody>
					          </table>   
					          <br/>
							  <div class="clearfix" align="center"> 
							   	 <input type="hidden" name="id" value="${vo.id}"/>
				                 <input type="submit" name="savebutton" class="btn_auto_30 btn_blue" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				                  <a class="btn_auto_30 btn_blue ml10" href="/template/index" target="_self">返回</a>
							  </div>
							  <br/>
					      </form>
			    </div>
		   </div>  
	</div>	
<@js>
     $('#timesPerHour').blur(function () {
          $("input[id='timesPerHour']").attr("data-action-valid-rule","minlength:0;maxlength:2;number;reg:^[1-9]\d*$");
      }) ;
      
       $('#timesPerDay').blur(function () {
          $("input[id='timesPerDay']").attr("data-action-valid-rule","minlength:0;maxlength:2;number;reg:^[1-9]\d*$");
      }) ;
</@js>
</@master>